<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>write的用法</title>
</head>
<body>
<div class="area">area</div>
<script>
//    用写入流可以引入外部文件
//    document.write("<script src='js/setDiv.js'><\/script>");

    document.write("<div>onload前写入</div>");

//    在onload后写入，或者在文档加载结束后写入，会重写以前所有的内容
    window.onload = function(){
        document.write("<div>aaa</div>");
        document.write("<b>sq</b>");
    }

</script>
</body>
</html>